#pragma once
#include "Runtime/BattleFirePrefix.h"

namespace Alice
{
    extern uint32 GNumExplicitGPUsForRendering;
    extern uint32 GVirtualMGPU;
    /** A mask where each bit is a GPU index. Can not be empty so that non SLI platforms can optimize it to be always 1.  */
    struct GPUMask
    {
        uint32 mGPUMask;
        FORCEINLINE uint32 GetMask() const
        {
            return mGPUMask;
        }
        FORCEINLINE explicit GPUMask(uint32 InGPUMask)
            : mGPUMask(InGPUMask)
        {
            checkSlow(InGPUMask != 0);
        }
        FORCEINLINE bool operator ==(GPUMask Rhs) const
        {
            return GetMask() == Rhs.GetMask();
        }
        FORCEINLINE static GPUMask All()
        {
            return GPUMask((1 << GNumExplicitGPUsForRendering) - 1);
        }
        FORCEINLINE uint32 GetNative() const
        {
            return GVirtualMGPU ? 1 : GetMask();
        }
    };
}
